﻿using System;
using System.Collections.Generic;
using System.IO;
using Nett;
using SystemModule;

namespace M2Server
{
    public class StringConfig
    {
        private readonly TomlTable _tableConfig;
        private const string sConfigName = "string.toml";

        public StringConfig()
        {
            if (!File.Exists(sConfigName))
            {
                Console.WriteLine($"配置文件{sConfigName}不存在.");
                return;
            }
            var input = new StreamReader(sConfigName);
            _tableConfig = Toml.ReadString(input.ReadToEnd());
        }

        /// <summary>
        /// 加载游戏文字提示信息
        /// </summary>
        public void Load()
        {
            M2Share.g_Config.sGuildNotice = GetConfig<string>("Guild", "GuildNotice", M2Share.g_Config.sGuildNotice);
            M2Share.g_Config.sGuildWar = GetConfig<string>("Guild", "GuildWar", M2Share.g_Config.sGuildWar);
            M2Share.g_Config.sGuildAll = GetConfig<string>("Guild", "GuildAll", M2Share.g_Config.sGuildAll);
            M2Share.g_Config.sGuildMember = GetConfig<string>("Guild", "GuildMember", M2Share.g_Config.sGuildMember);
            M2Share.g_Config.sGuildMemberRank = GetConfig<string>("Guild", "GuildMemberRank", M2Share.g_Config.sGuildMemberRank);
            M2Share.g_Config.sGuildChief = GetConfig<string>("Guild", "GuildChief", M2Share.g_Config.sGuildChief);

            M2Share.g_Config.sWebSite = GetConfig<string>("Server", "WebSite", M2Share.g_Config.sWebSite);
            M2Share.g_Config.sBbsSite = GetConfig<string>("Server", "BbsSite", M2Share.g_Config.sBbsSite);
            M2Share.g_Config.sClientDownload = GetConfig<string>("Server", "ClientDownload", M2Share.g_Config.sClientDownload);
            M2Share.g_Config.sQQ = GetConfig<string>("Server", "QQ", M2Share.g_Config.sQQ);
            M2Share.g_Config.sPhone = GetConfig<string>("Server", "Phone", M2Share.g_Config.sPhone);
            M2Share.g_Config.sBankAccount0 = GetConfig<string>("Server", "BankAccount0", M2Share.g_Config.sBankAccount0);
            M2Share.g_Config.sBankAccount1 = GetConfig<string>("Server", "BankAccount1", M2Share.g_Config.sBankAccount1);
            M2Share.g_Config.sBankAccount2 = GetConfig<string>("Server", "BankAccount2", M2Share.g_Config.sBankAccount2);
            M2Share.g_Config.sBankAccount3 = GetConfig<string>("Server", "BankAccount3", M2Share.g_Config.sBankAccount3);
            M2Share.g_Config.sBankAccount4 = GetConfig<string>("Server", "BankAccount4", M2Share.g_Config.sBankAccount4);
            M2Share.g_Config.sBankAccount5 = GetConfig<string>("Server", "BankAccount5", M2Share.g_Config.sBankAccount5);
            M2Share.g_Config.sBankAccount6 = GetConfig<string>("Server", "BankAccount6", M2Share.g_Config.sBankAccount6);
            M2Share.g_Config.sBankAccount7 = GetConfig<string>("Server", "BankAccount7", M2Share.g_Config.sBankAccount7);
            M2Share.g_Config.sBankAccount8 = GetConfig<string>("Server", "BankAccount8", M2Share.g_Config.sBankAccount8);
            M2Share.g_Config.sBankAccount9 = GetConfig<string>("Server", "BankAccount9", M2Share.g_Config.sBankAccount9);
            GameMsgDef.sClientSoftVersionError = GetConfig<string>("string", "ClientSoftVersionError", GameMsgDef.sClientSoftVersionError);
            GameMsgDef.sDownLoadNewClientSoft = GetConfig<string>("string", "DownLoadNewClientSoft", GameMsgDef.sDownLoadNewClientSoft);
            GameMsgDef.sForceDisConnect = GetConfig<string>("string", "ForceDisConnect", GameMsgDef.sForceDisConnect);
            GameMsgDef.sClientSoftVersionTooOld = GetConfig<string>("string", "ClientSoftVersionTooOld", GameMsgDef.sClientSoftVersionTooOld);
            GameMsgDef.sDownLoadAndUseNewClient = GetConfig<string>("string", "DownLoadAndUseNewClient", GameMsgDef.sDownLoadAndUseNewClient);
            GameMsgDef.sOnlineUserFull = GetConfig<string>("string", "OnlineUserFull", GameMsgDef.sOnlineUserFull);
            GameMsgDef.sYouNowIsTryPlayMode = GetConfig<string>("string", "YouNowIsTryPlayMode", GameMsgDef.sYouNowIsTryPlayMode);
            GameMsgDef.g_sNowIsFreePlayMode = GetConfig<string>("string", "NowIsFreePlayMode", GameMsgDef.g_sNowIsFreePlayMode);
            GameMsgDef.sAttackModeOfDear = GetConfig<string>("string", "AttackModeOfDear", GameMsgDef.sAttackModeOfDear);
            GameMsgDef.sAttackModeOfMaster = GetConfig<string>("string", "AttackModeOfMaster", GameMsgDef.sAttackModeOfMaster);
            GameMsgDef.sAttackModeOfAll = GetConfig<string>("string", "AttackModeOfAll", GameMsgDef.sAttackModeOfAll);
            GameMsgDef.sAttackModeOfPeaceful = GetConfig<string>("string", "AttackModeOfPeaceful", GameMsgDef.sAttackModeOfPeaceful);
            GameMsgDef.sAttackModeOfGroup = GetConfig<string>("string", "AttackModeOfGroup", GameMsgDef.sAttackModeOfGroup);
            GameMsgDef.sAttackModeOfGuild = GetConfig<string>("string", "AttackModeOfGuild", GameMsgDef.sAttackModeOfGuild);
            GameMsgDef.sAttackModeOfRedWhite = GetConfig<string>("string", "AttackModeOfRedWhite", GameMsgDef.sAttackModeOfRedWhite);
            GameMsgDef.sStartChangeAttackModeHelp = GetConfig<string>("string", "StartChangeAttackModeHelp", GameMsgDef.sStartChangeAttackModeHelp);
            GameMsgDef.sStartNoticeMsg = GetConfig<string>("string", "StartNoticeMsg", GameMsgDef.sStartNoticeMsg);
            GameMsgDef.sThrustingOn = GetConfig<string>("string", "ThrustingOn", GameMsgDef.sThrustingOn);
            GameMsgDef.sThrustingOff = GetConfig<string>("string", "ThrustingOff", GameMsgDef.sThrustingOff);
            GameMsgDef.sHalfMoonOn = GetConfig<string>("string", "HalfMoonOn", GameMsgDef.sHalfMoonOn);
            GameMsgDef.sHalfMoonOff = GetConfig<string>("string", "HalfMoonOff", GameMsgDef.sHalfMoonOff);
            GameMsgDef.sFireSpiritsSummoned = GetConfig<string>("string", "FireSpiritsSummoned", GameMsgDef.sFireSpiritsSummoned);
            GameMsgDef.sFireSpiritsFail = GetConfig<string>("string", "FireSpiritsFail", GameMsgDef.sFireSpiritsFail);
            GameMsgDef.sSpiritsGone = GetConfig<string>("string", "SpiritsGone", GameMsgDef.sSpiritsGone);
            GameMsgDef.sDailySkillSummoned = GetConfig<string>("string", "DailySkillSummoned", GameMsgDef.sDailySkillSummoned);
            GameMsgDef.sDailySkillFail = GetConfig<string>("string", "DailySkillFail", GameMsgDef.sDailySkillFail);
            GameMsgDef.sDailySpiritsGone = GetConfig<string>("string", "DailySpiritsGone", GameMsgDef.sDailySpiritsGone);
            GameMsgDef.sMateDoTooweak = GetConfig<string>("string", "MateDoTooweak", GameMsgDef.sMateDoTooweak);
            GameMsgDef.g_sTheWeaponBroke = GetConfig<string>("string", "TheWeaponBroke", GameMsgDef.g_sTheWeaponBroke);
            GameMsgDef.sTheWeaponRefineSuccessfull = GetConfig<string>("string", "TheWeaponRefineSuccessfull", GameMsgDef.sTheWeaponRefineSuccessfull);
            GameMsgDef.sYouPoisoned = GetConfig<string>("string", "YouPoisoned", GameMsgDef.sYouPoisoned);
            GameMsgDef.sYouPoisonedSpider = GetConfig<string>("string", "YouPoisonedSpider", GameMsgDef.sYouPoisonedSpider);
            GameMsgDef.sGetSellOffGlod = GetConfig<string>("string", "GetSellOffGlod", GameMsgDef.sGetSellOffGlod);
            GameMsgDef.sButchEnoughBagHintMsg = GetConfig<string>("string", "ButchEnoughBagHintMsg", GameMsgDef.sButchEnoughBagHintMsg);
            GameMsgDef.sHumLevelOrderDropMsg = GetConfig<string>("string", "HumLevelOrderDropMsg", GameMsgDef.sHumLevelOrderDropMsg);
            GameMsgDef.sRefineItemSuccessMsg = GetConfig<string>("string", "RefineItemSuccess", GameMsgDef.sRefineItemSuccessMsg);
            GameMsgDef.sRefineItemFailMsg = GetConfig<string>("string", "RefineItemFail", GameMsgDef.sRefineItemFailMsg);
            GameMsgDef.sRefineItemErrorMsg = GetConfig<string>("string", "RefineItemError", GameMsgDef.sRefineItemErrorMsg);
            GameMsgDef.sNEEDLEVELToXYErrorMsg = GetConfig<string>("string", "NeedLevelToXYErrorMsg", GameMsgDef.sNEEDLEVELToXYErrorMsg);
            GameMsgDef.sPetRest = GetConfig<string>("string", "PetRest", GameMsgDef.sPetRest);
            GameMsgDef.sPetAttack = GetConfig<string>("string", "PetAttack", GameMsgDef.sPetAttack);
            GameMsgDef.sWearNotOfWoMan = GetConfig<string>("string", "WearNotOfWoMan", GameMsgDef.sWearNotOfWoMan);
            GameMsgDef.sWearNotOfMan = GetConfig<string>("string", "WearNotOfMan", GameMsgDef.sWearNotOfMan);
            GameMsgDef.sHandWeightNot = GetConfig<string>("string", "HandWeightNot", GameMsgDef.sHandWeightNot);
            GameMsgDef.sWearWeightNot = GetConfig<string>("string", "WearWeightNot", GameMsgDef.sWearWeightNot);
            GameMsgDef.g_sItemIsNotThisAccount = GetConfig<string>("string", "ItemIsNotThisAccount", GameMsgDef.g_sItemIsNotThisAccount);
            GameMsgDef.g_sItemIsNotThisIPaddr = GetConfig<string>("string", "ItemIsNotThisIPaddr", GameMsgDef.g_sItemIsNotThisIPaddr);
            GameMsgDef.g_sItemIsNotThisCharName = GetConfig<string>("string", "ItemIsNotThisCharName", GameMsgDef.g_sItemIsNotThisCharName);
            GameMsgDef.g_sLevelNot = GetConfig<string>("string", "LevelNot", GameMsgDef.g_sLevelNot);
            GameMsgDef.g_sJobOrLevelNot = GetConfig<string>("string", "JobOrLevelNot", GameMsgDef.g_sJobOrLevelNot);
            GameMsgDef.g_sJobOrDCNot = GetConfig<string>("string", "JobOrDCNot", GameMsgDef.g_sJobOrDCNot);
            GameMsgDef.g_sJobOrMCNot = GetConfig<string>("string", "JobOrMCNot", GameMsgDef.g_sJobOrMCNot);
            GameMsgDef.g_sJobOrSCNot = GetConfig<string>("string", "JobOrSCNot", GameMsgDef.g_sJobOrSCNot);
            GameMsgDef.g_sDCNot = GetConfig<string>("string", "DCNot", GameMsgDef.g_sDCNot);
            GameMsgDef.g_sMCNot = GetConfig<string>("string", "MCNot", GameMsgDef.g_sMCNot);
            GameMsgDef.g_sSCNot = GetConfig<string>("string", "SCNot", GameMsgDef.g_sSCNot);
            GameMsgDef.g_sCreditPointNot = GetConfig<string>("string", "CreditPointNot", GameMsgDef.g_sCreditPointNot);
            GameMsgDef.g_sReNewLevelNot = GetConfig<string>("string", "ReNewLevelNot", GameMsgDef.g_sReNewLevelNot);
            GameMsgDef.g_sGuildNot = GetConfig<string>("string", "GuildNot", GameMsgDef.g_sGuildNot);
            GameMsgDef.g_sGuildMasterNot = GetConfig<string>("string", "GuildMasterNot", GameMsgDef.g_sGuildMasterNot);
            GameMsgDef.g_sSabukHumanNot = GetConfig<string>("string", "SabukHumanNot", GameMsgDef.g_sSabukHumanNot);
            GameMsgDef.g_sSabukMasterManNot = GetConfig<string>("string", "SabukMasterManNot", GameMsgDef.g_sSabukMasterManNot);
            GameMsgDef.g_sMemberNot = GetConfig<string>("string", "MemberNot", GameMsgDef.g_sMemberNot);
            GameMsgDef.g_sMemberTypeNot = GetConfig<string>("string", "MemberTypeNot", GameMsgDef.g_sMemberTypeNot);
            GameMsgDef.g_sCanottWearIt = GetConfig<string>("string", "CanottWearIt", GameMsgDef.g_sCanottWearIt);
            GameMsgDef.sCanotUseDrugOnThisMap = GetConfig<string>("string", "CanotUseDrugOnThisMap", GameMsgDef.sCanotUseDrugOnThisMap);
            GameMsgDef.sGameMasterMode = GetConfig<string>("string", "GameMasterMode", GameMsgDef.sGameMasterMode);
            GameMsgDef.sReleaseGameMasterMode = GetConfig<string>("string", "ReleaseGameMasterMode", GameMsgDef.sReleaseGameMasterMode);
            GameMsgDef.sObserverMode = GetConfig<string>("string", "ObserverMode", GameMsgDef.sObserverMode);
            GameMsgDef.g_sReleaseObserverMode = GetConfig<string>("string", "ReleaseObserverMode", GameMsgDef.g_sReleaseObserverMode);
            GameMsgDef.sSupermanMode = GetConfig<string>("string", "SupermanMode", GameMsgDef.sSupermanMode);
            GameMsgDef.sReleaseSupermanMode = GetConfig<string>("string", "ReleaseSupermanMode", GameMsgDef.sReleaseSupermanMode);
            GameMsgDef.sYouFoundNothing = GetConfig<string>("string", "YouFoundNothing", GameMsgDef.sYouFoundNothing);
            M2Share.g_Config.sLineNoticePreFix = GetConfig<string>("string", "LineNoticePreFix", M2Share.g_Config.sLineNoticePreFix);
            M2Share.g_Config.sSysMsgPreFix = GetConfig<string>("string", "SysMsgPreFix", M2Share.g_Config.sSysMsgPreFix);
            M2Share.g_Config.sGuildMsgPreFix = GetConfig<string>("string", "GuildMsgPreFix", M2Share.g_Config.sGuildMsgPreFix);
            M2Share.g_Config.sGroupMsgPreFix = GetConfig<string>("string", "GroupMsgPreFix", M2Share.g_Config.sGroupMsgPreFix);
            M2Share.g_Config.sHintMsgPreFix = GetConfig<string>("string", "HintMsgPreFix", M2Share.g_Config.sHintMsgPreFix);
            M2Share.g_Config.sGMRedMsgpreFix = GetConfig<string>("string", "GMRedMsgpreFix", M2Share.g_Config.sGMRedMsgpreFix);
            M2Share.g_Config.sMonSayMsgpreFix = GetConfig<string>("string", "MonSayMsgpreFix", M2Share.g_Config.sMonSayMsgpreFix);
            M2Share.g_Config.sCustMsgpreFix = GetConfig<string>("string", "CustMsgpreFix", M2Share.g_Config.sCustMsgpreFix);
            M2Share.g_Config.sCastleMsgpreFix = GetConfig<string>("string", "CastleMsgpreFix", M2Share.g_Config.sCastleMsgpreFix);
            GameMsgDef.g_sNoPasswordLockSystemMsg = GetConfig<string>("string", "NoPasswordLockSystemMsg", GameMsgDef.g_sNoPasswordLockSystemMsg);
            GameMsgDef.g_sAlreadySetPasswordMsg = GetConfig<string>("string", "AlreadySetPassword", GameMsgDef.g_sAlreadySetPasswordMsg);
            GameMsgDef.g_sReSetPasswordMsg = GetConfig<string>("string", "ReSetPassword", GameMsgDef.g_sReSetPasswordMsg);
            GameMsgDef.g_sPasswordOverLongMsg = GetConfig<string>("string", "PasswordOverLong", GameMsgDef.g_sPasswordOverLongMsg);
            GameMsgDef.g_sReSetPasswordOKMsg = GetConfig<string>("string", "ReSetPasswordOK", GameMsgDef.g_sReSetPasswordOKMsg);
            GameMsgDef.g_sReSetPasswordNotMatchMsg = GetConfig<string>("string", "ReSetPasswordNotMatch", GameMsgDef.g_sReSetPasswordNotMatchMsg);
            GameMsgDef.g_sPleaseInputUnLockPasswordMsg = GetConfig<string>("string", "PleaseInputUnLockPassword", GameMsgDef.g_sPleaseInputUnLockPasswordMsg);
            GameMsgDef.g_sStorageUnLockOKMsg = GetConfig<string>("string", "StorageUnLockOK", GameMsgDef.g_sStorageUnLockOKMsg);
            GameMsgDef.g_sStorageAlreadyUnLockMsg = GetConfig<string>("string", "StorageAlreadyUnLock", GameMsgDef.g_sStorageAlreadyUnLockMsg);
            GameMsgDef.g_sStorageNoPasswordMsg = GetConfig<string>("string", "StorageNoPassword", GameMsgDef.g_sStorageNoPasswordMsg);
            GameMsgDef.g_sUnLockPasswordFailMsg = GetConfig<string>("string", "UnLockPasswordFail", GameMsgDef.g_sUnLockPasswordFailMsg);
            GameMsgDef.g_sLockStorageSuccessMsg = GetConfig<string>("string", "LockStorageSuccess", GameMsgDef.g_sLockStorageSuccessMsg);
            GameMsgDef.g_sStoragePasswordClearMsg = GetConfig<string>("string", "StoragePasswordClearMsg", GameMsgDef.g_sStoragePasswordClearMsg);
            GameMsgDef.g_sPleaseUnloadStoragePasswordMsg = GetConfig<string>("string", "PleaseUnloadStoragePasswordMsg", GameMsgDef.g_sPleaseUnloadStoragePasswordMsg);
            GameMsgDef.g_sStorageAlreadyLockMsg = GetConfig<string>("string", "StorageAlreadyLock", GameMsgDef.g_sStorageAlreadyLockMsg);
            GameMsgDef.g_sStoragePasswordLockedMsg = GetConfig<string>("string", "StoragePasswordLocked", GameMsgDef.g_sStoragePasswordLockedMsg);
            GameMsgDef.g_sSetPasswordMsg = GetConfig<string>("string", "StorageSetPassword", GameMsgDef.g_sSetPasswordMsg);
            GameMsgDef.g_sPleaseInputOldPasswordMsg = GetConfig<string>("string", "PleaseInputOldPassword", GameMsgDef.g_sPleaseInputOldPasswordMsg);
            GameMsgDef.g_sOldPasswordIsClearMsg = GetConfig<string>("string", "PasswordIsClearMsg", GameMsgDef.g_sOldPasswordIsClearMsg);
            GameMsgDef.g_sNoPasswordSetMsg = GetConfig<string>("string", "NoPasswordSet", GameMsgDef.g_sNoPasswordSetMsg);
            GameMsgDef.g_sOldPasswordIncorrectMsg = GetConfig<string>("string", "OldPasswordIncorrect", GameMsgDef.g_sOldPasswordIncorrectMsg);
            GameMsgDef.g_sStorageIsLockedMsg = GetConfig<string>("string", "StorageIsLocked", GameMsgDef.g_sStorageIsLockedMsg);
            GameMsgDef.g_sPleaseTryDealLaterMsg = GetConfig<string>("string", "PleaseTryDealLaterMsg", GameMsgDef.g_sPleaseTryDealLaterMsg);
            GameMsgDef.g_sDealItemsDenyGetBackMsg = GetConfig<string>("string", "DealItemsDenyGetBackMsg", GameMsgDef.g_sDealItemsDenyGetBackMsg);
            GameMsgDef.g_sDisableDealItemsMsg = GetConfig<string>("string", "DisableDealItemsMsg", GameMsgDef.g_sDisableDealItemsMsg);
            GameMsgDef.g_sCanotTryDealMsg = GetConfig<string>("string", "CanotTryDealMsg", GameMsgDef.g_sCanotTryDealMsg);
            GameMsgDef.g_sDealActionCancelMsg = GetConfig<string>("string", "DealActionCancelMsg", GameMsgDef.g_sDealActionCancelMsg);
            GameMsgDef.g_sPoseDisableDealMsg = GetConfig<string>("string", "PoseDisableDealMsg", GameMsgDef.g_sPoseDisableDealMsg);
            GameMsgDef.g_sDealSuccessMsg = GetConfig<string>("string", "DealSuccessMsg", GameMsgDef.g_sDealSuccessMsg);
            GameMsgDef.g_sDealOKTooFast = GetConfig<string>("string", "DealOKTooFast", GameMsgDef.g_sDealOKTooFast);
            GameMsgDef.g_sYourBagSizeTooSmall = GetConfig<string>("string", "YourBagSizeTooSmall", GameMsgDef.g_sYourBagSizeTooSmall);
            GameMsgDef.g_sDealHumanBagSizeTooSmall = GetConfig<string>("string", "DealHumanBagSizeTooSmall", GameMsgDef.g_sDealHumanBagSizeTooSmall);
            GameMsgDef.g_sYourGoldLargeThenLimit = GetConfig<string>("string", "YourGoldLargeThenLimit", GameMsgDef.g_sYourGoldLargeThenLimit);
            GameMsgDef.g_sDealHumanGoldLargeThenLimit = GetConfig<string>("string", "DealHumanGoldLargeThenLimit", GameMsgDef.g_sDealHumanGoldLargeThenLimit);
            GameMsgDef.g_sYouDealOKMsg = GetConfig<string>("string", "YouDealOKMsg", GameMsgDef.g_sYouDealOKMsg);
            GameMsgDef.g_sPoseDealOKMsg = GetConfig<string>("string", "PoseDealOKMsg", GameMsgDef.g_sPoseDealOKMsg);
            GameMsgDef.g_sKickClientUserMsg = GetConfig<string>("string", "KickClientUserMsg", GameMsgDef.g_sKickClientUserMsg);
            GameMsgDef.g_sActionIsLockedMsg = GetConfig<string>("string", "ActionIsLockedMsg", GameMsgDef.g_sActionIsLockedMsg);
            GameMsgDef.g_sPasswordNotSetMsg = GetConfig<string>("string", "PasswordNotSetMsg", GameMsgDef.g_sPasswordNotSetMsg);
            GameMsgDef.g_sRecallHeroHint = GetConfig<string>("string", "CallHeroTime", GameMsgDef.g_sRecallHeroHint);
            GameMsgDef.g_sNotHero = GetConfig<string>("string", "NotHero", GameMsgDef.g_sNotHero);
            GameMsgDef.g_sOpenShieldMsg = GetConfig<string>("string", "OpenShieldMsg", GameMsgDef.g_sOpenShieldMsg);
            GameMsgDef.g_sOpenShieldTickMsg = GetConfig<string>("string", "OpenShieldTickMsg", GameMsgDef.g_sOpenShieldTickMsg);
            GameMsgDef.g_sButchItemHintMsg = GetConfig<string>("string", "ButchItemHintMsg", GameMsgDef.g_sButchItemHintMsg);
            GameMsgDef.g_sBoxsItemHintMsg = GetConfig<string>("string", "BoxsItemHintMsg", GameMsgDef.g_sBoxsItemHintMsg);
            GameMsgDef.g_sItmeDropHintMsg = GetConfig<string>("string", "ItmeDropHintMsg", GameMsgDef.g_sItmeDropHintMsg);
            GameMsgDef.g_sJiujinOverHintMsg = GetConfig<string>("string", "JiujinOverHintMsg", GameMsgDef.g_sJiujinOverHintMsg);
            GameMsgDef.g_sUpAlcoholHintMsg = GetConfig<string>("string", "UpAlcoholHintMsg", GameMsgDef.g_sUpAlcoholHintMsg);
            GameMsgDef.g_sChallengeWinMsg = GetConfig<string>("string", "ChallengeWinMsg", GameMsgDef.g_sChallengeWinMsg);
            GameMsgDef.g_sChallengeLoseMsg = GetConfig<string>("string", "ChallengeLoseMsg", GameMsgDef.g_sChallengeLoseMsg);
            GameMsgDef.g_sPleaseTryChallengeLaterMsg = GetConfig<string>("string", "PleaseTryChallengeLaterMsg", GameMsgDef.g_sPleaseTryChallengeLaterMsg);
            GameMsgDef.g_sChallengeActionCancelMsg = GetConfig<string>("string", "ChallengeActionCancelMsg", GameMsgDef.g_sChallengeActionCancelMsg);
            GameMsgDef.g_sChallengeItemsDenyGetBackMsg = GetConfig<string>("string", "ChallengeItemsDenyGetBackMsg", GameMsgDef.g_sChallengeItemsDenyGetBackMsg);
            GameMsgDef.g_sChallengeOKTooFast = GetConfig<string>("string", "ChallengeOKTooFast", GameMsgDef.g_sChallengeOKTooFast);
            GameMsgDef.g_sChallengeYourBagSizeTooSmall = GetConfig<string>("string", "ChallengeYourBagSizeTooSmall", GameMsgDef.g_sChallengeYourBagSizeTooSmall);
            GameMsgDef.g_sChallengeYourGoldLargeThenLimit = GetConfig<string>("string", "ChallengeYourGoldLargeThenLimit", GameMsgDef.g_sChallengeYourGoldLargeThenLimit);
            GameMsgDef.g_sChallengeHumanBagSizeTooSmall = GetConfig<string>("string", "ChallengeHumanBagSizeTooSmall", GameMsgDef.g_sChallengeHumanBagSizeTooSmall);
            GameMsgDef.g_sChallengeHumanGoldLargeThenLimit = GetConfig<string>("string", "ChallengeHumanGoldLargeThenLimit", GameMsgDef.g_sChallengeHumanGoldLargeThenLimit);
            GameMsgDef.g_sYouChallengeOKMsg = GetConfig<string>("string", "YouChallengeOKMsg", GameMsgDef.g_sYouChallengeOKMsg);
            GameMsgDef.g_sPoseChallengeOKMsg = GetConfig<string>("string", "PoseChallengeOKMsg", GameMsgDef.g_sPoseChallengeOKMsg);
            GameMsgDef.g_sChallengeTimeOverMsg = GetConfig<string>("string", "ChallengeTimeOverMsg", GameMsgDef.g_sChallengeTimeOverMsg);
            GameMsgDef.g_sPickUpItemHintMsg = GetConfig<string>("string", "PickUpItemHintMsg", GameMsgDef.g_sPickUpItemHintMsg);
            GameMsgDef.g_sShieldTimeDisappearMsg = GetConfig<string>("string", "ShieldTimeDisappearMsg", GameMsgDef.g_sShieldTimeDisappearMsg);
            GameMsgDef.g_sOpenShieldOKMsg = GetConfig<string>("string", "OpenShieldOKMsg", GameMsgDef.g_sOpenShieldOKMsg);
            GameMsgDef.g_sHeroLoginMsg = GetConfig<string>("string", "HeroHit", GameMsgDef.g_sHeroLoginMsg);
            GameMsgDef.g_sHeroProtect = GetConfig<string>("string", "HeroProtect", GameMsgDef.g_sHeroProtect);
            GameMsgDef.g_sHeroNotProtect = GetConfig<string>("string", "HeroNotProtect", GameMsgDef.g_sHeroNotProtect);
            GameMsgDef.g_sHeroClose = GetConfig<string>("string", "HeroClose", GameMsgDef.g_sHeroClose);
            GameMsgDef.g_sHeroRest = GetConfig<string>("string", "HeroRest", GameMsgDef.g_sHeroRest);
            GameMsgDef.g_sHeroAttack = GetConfig<string>("string", "HeroAttack", GameMsgDef.g_sHeroAttack);
            GameMsgDef.g_sHeroFollow = GetConfig<string>("string", "HeroFollow", GameMsgDef.g_sHeroFollow);
            GameMsgDef.g_sNotPasswordProtectMode = GetConfig<string>("string", "NotPasswordProtectMode", GameMsgDef.g_sNotPasswordProtectMode);
            GameMsgDef.g_sCanotDropGoldMsg = GetConfig<string>("string", "CanotDropGoldMsg", GameMsgDef.g_sCanotDropGoldMsg);
            GameMsgDef.g_sCanotDropInSafeZoneMsg = GetConfig<string>("string", "CanotDropInSafeZoneMsg", GameMsgDef.g_sCanotDropInSafeZoneMsg);
            GameMsgDef.g_sCanotDropItemMsg = GetConfig<string>("string", "CanotDropItemMsg", GameMsgDef.g_sCanotDropItemMsg);
            GameMsgDef.g_sCanotDropItemMsg = GetConfig<string>("string", "CanotDropItemMsg", GameMsgDef.g_sCanotDropItemMsg);
            GameMsgDef.g_sCanotUseItemMsg = GetConfig<string>("string", "CanotUseItemMsg", GameMsgDef.g_sCanotUseItemMsg);
            GameMsgDef.g_sStartMarryManMsg = GetConfig<string>("string", "StartMarryManMsg", GameMsgDef.g_sStartMarryManMsg);
            GameMsgDef.g_sStartMarryWoManMsg = GetConfig<string>("string", "StartMarryWoManMsg", GameMsgDef.g_sStartMarryWoManMsg);
            GameMsgDef.g_sStartMarryManAskQuestionMsg = GetConfig<string>("string", "StartMarryManAskQuestionMsg", GameMsgDef.g_sStartMarryManAskQuestionMsg);
            GameMsgDef.g_sStartMarryWoManAskQuestionMsg = GetConfig<string>("string", "StartMarryWoManAskQuestionMsg", GameMsgDef.g_sStartMarryWoManAskQuestionMsg);
            GameMsgDef.g_sMarryManAnswerQuestionMsg = GetConfig<string>("string", "MarryManAnswerQuestionMsg", GameMsgDef.g_sMarryManAnswerQuestionMsg);
            GameMsgDef.g_sMarryManAskQuestionMsg = GetConfig<string>("string", "MarryManAskQuestionMsg", GameMsgDef.g_sMarryManAskQuestionMsg);
            GameMsgDef.g_sMarryWoManAnswerQuestionMsg = GetConfig<string>("string", "MarryWoManAnswerQuestionMsg", GameMsgDef.g_sMarryWoManAnswerQuestionMsg);
            GameMsgDef.g_sMarryWoManGetMarryMsg = GetConfig<string>("string", "MarryWoManGetMarryMsg", GameMsgDef.g_sMarryWoManGetMarryMsg);
            GameMsgDef.g_sMarryWoManDenyMsg = GetConfig<string>("string", "MarryWoManDenyMsg", GameMsgDef.g_sMarryWoManDenyMsg);
            GameMsgDef.g_sMarryWoManCancelMsg = GetConfig<string>("string", "MarryWoManCancelMsg", GameMsgDef.g_sMarryWoManCancelMsg);
            GameMsgDef.g_sfUnMarryManLoginMsg = GetConfig<string>("string", "ForceUnMarryManLoginMsg", GameMsgDef.g_sfUnMarryManLoginMsg);
            GameMsgDef.g_sfUnMarryWoManLoginMsg = GetConfig<string>("string", "ForceUnMarryWoManLoginMsg", GameMsgDef.g_sfUnMarryWoManLoginMsg);
            GameMsgDef.g_sManLoginDearOnlineSelfMsg = GetConfig<string>("string", "ManLoginDearOnlineSelfMsg", GameMsgDef.g_sManLoginDearOnlineSelfMsg);
            GameMsgDef.g_sManLoginDearOnlineDearMsg = GetConfig<string>("string", "ManLoginDearOnlineDearMsg", GameMsgDef.g_sManLoginDearOnlineDearMsg);
            GameMsgDef.g_sWoManLoginDearOnlineSelfMsg = GetConfig<string>("string", "WoManLoginDearOnlineSelfMsg", GameMsgDef.g_sWoManLoginDearOnlineSelfMsg);
            GameMsgDef.g_sWoManLoginDearOnlineDearMsg = GetConfig<string>("string", "WoManLoginDearOnlineDearMsg", GameMsgDef.g_sWoManLoginDearOnlineDearMsg);
            GameMsgDef.g_sManLoginDearNotOnlineMsg = GetConfig<string>("string", "ManLoginDearNotOnlineMsg", GameMsgDef.g_sManLoginDearNotOnlineMsg);
            GameMsgDef.g_sWoManLoginDearNotOnlineMsg = GetConfig<string>("string", "WoManLoginDearNotOnlineMsg", GameMsgDef.g_sWoManLoginDearNotOnlineMsg);
            GameMsgDef.g_sManLongOutDearOnlineMsg = GetConfig<string>("string", "ManLongOutDearOnlineMsg", GameMsgDef.g_sManLongOutDearOnlineMsg);
            GameMsgDef.g_sWoManLongOutDearOnlineMsg = GetConfig<string>("string", "WoManLongOutDearOnlineMsg", GameMsgDef.g_sWoManLongOutDearOnlineMsg);
            GameMsgDef.g_sYouAreNotMarryedMsg = GetConfig<string>("string", "YouAreNotMarryedMsg", GameMsgDef.g_sYouAreNotMarryedMsg);
            GameMsgDef.g_sYourWifeNotOnlineMsg = GetConfig<string>("string", "YourWifeNotOnlineMsg", GameMsgDef.g_sYourWifeNotOnlineMsg);
            GameMsgDef.g_sYourHusbandNotOnlineMsg = GetConfig<string>("string", "YourHusbandNotOnlineMsg", GameMsgDef.g_sYourHusbandNotOnlineMsg);
            GameMsgDef.g_sYourWifeNowLocateMsg = GetConfig<string>("string", "YourWifeNowLocateMsg", GameMsgDef.g_sYourWifeNowLocateMsg);
            GameMsgDef.g_sYourHusbandSearchLocateMsg = GetConfig<string>("string", "YourHusbandSearchLocateMsg", GameMsgDef.g_sYourHusbandSearchLocateMsg);
            GameMsgDef.g_sYourHusbandNowLocateMsg = GetConfig<string>("string", "YourHusbandNowLocateMsg", GameMsgDef.g_sYourHusbandNowLocateMsg);
            GameMsgDef.g_sYourWifeSearchLocateMsg = GetConfig<string>("string", "YourWifeSearchLocateMsg", GameMsgDef.g_sYourWifeSearchLocateMsg);
            GameMsgDef.g_sfUnMasterLoginMsg = GetConfig<string>("string", "FUnMasterLoginMsg", GameMsgDef.g_sfUnMasterLoginMsg);
            GameMsgDef.g_sfUnMasterListLoginMsg = GetConfig<string>("string", "UnMasterListLoginMsg", GameMsgDef.g_sfUnMasterListLoginMsg);
            GameMsgDef.g_sMasterListOnlineSelfMsg = GetConfig<string>("string", "MasterListOnlineSelfMsg", GameMsgDef.g_sMasterListOnlineSelfMsg);
            GameMsgDef.g_sMasterListOnlineMasterMsg = GetConfig<string>("string", "MasterListOnlineMasterMsg", GameMsgDef.g_sMasterListOnlineMasterMsg);
            GameMsgDef.g_sMasterOnlineSelfMsg = GetConfig<string>("string", "MasterOnlineSelfMsg", GameMsgDef.g_sMasterOnlineSelfMsg);
            GameMsgDef.g_sMasterOnlineMasterListMsg = GetConfig<string>("string", "MasterOnlineMasterListMsg", GameMsgDef.g_sMasterOnlineMasterListMsg);
            GameMsgDef.g_sMasterLongOutMasterListOnlineMsg = GetConfig<string>("string", "MasterLongOutMasterListOnlineMsg", GameMsgDef.g_sMasterLongOutMasterListOnlineMsg);
            GameMsgDef.g_sMasterListLongOutMasterOnlineMsg = GetConfig<string>("string", "MasterListLongOutMasterOnlineMsg", GameMsgDef.g_sMasterListLongOutMasterOnlineMsg);
            GameMsgDef.g_sMasterListNotOnlineMsg = GetConfig<string>("string", "MasterListNotOnlineMsg", GameMsgDef.g_sMasterListNotOnlineMsg);
            GameMsgDef.g_sMasterNotOnlineMsg = GetConfig<string>("string", "MasterNotOnlineMsg", GameMsgDef.g_sMasterNotOnlineMsg);
            GameMsgDef.g_sYouAreNotMasterMsg = GetConfig<string>("string", "YouAreNotMasterMsg", GameMsgDef.g_sYouAreNotMasterMsg);
            GameMsgDef.g_sYourMasterNotOnlineMsg = GetConfig<string>("string", "YourMasterNotOnlineMsg", GameMsgDef.g_sYourMasterNotOnlineMsg);
            GameMsgDef.g_sYourMasterListNotOnlineMsg = GetConfig<string>("string", "YourMasterListNotOnlineMsg", GameMsgDef.g_sYourMasterListNotOnlineMsg);
            GameMsgDef.g_sYourMasterNowLocateMsg = GetConfig<string>("string", "YourMasterNowLocateMsg", GameMsgDef.g_sYourMasterNowLocateMsg);
            GameMsgDef.g_sYourMasterListSearchLocateMsg = GetConfig<string>("string", "YourMasterListSearchLocateMsg", GameMsgDef.g_sYourMasterListSearchLocateMsg);
            GameMsgDef.g_sYourMasterListNowLocateMsg = GetConfig<string>("string", "YourMasterListNowLocateMsg", GameMsgDef.g_sYourMasterListNowLocateMsg);
            GameMsgDef.g_sYourMasterSearchLocateMsg = GetConfig<string>("string", "YourMasterSearchLocateMsg", GameMsgDef.g_sYourMasterSearchLocateMsg);
            GameMsgDef.g_sYourMasterListUnMasterOKMsg = GetConfig<string>("string", "YourMasterListUnMasterOKMsg", GameMsgDef.g_sYourMasterListUnMasterOKMsg);
            GameMsgDef.g_sYouAreUnMasterOKMsg = GetConfig<string>("string", "YouAreUnMasterOKMsg", GameMsgDef.g_sYouAreUnMasterOKMsg);
            GameMsgDef.g_sUnMasterLoginMsg = GetConfig<string>("string", "UnMasterLoginMsg", GameMsgDef.g_sUnMasterLoginMsg);
            GameMsgDef.g_sNPCSayUnMasterOKMsg = GetConfig<string>("string", "NPCSayUnMasterOKMsg", GameMsgDef.g_sNPCSayUnMasterOKMsg);
            GameMsgDef.g_sNPCSayForceUnMasterMsg = GetConfig<string>("string", "NPCSayForceUnMasterMsg", GameMsgDef.g_sNPCSayForceUnMasterMsg);
            GameMsgDef.g_sMyInfo = GetConfig<string>("string", "MyInfo", GameMsgDef.g_sMyInfo);
            GameMsgDef.g_sOpenedDealMsg = GetConfig<string>("string", "OpenedDealMsg", GameMsgDef.g_sOpenedDealMsg);
            GameMsgDef.g_sSendCustMsgCanNotUseNowMsg = GetConfig<string>("string", "SendCustMsgCanNotUseNowMsg", GameMsgDef.g_sSendCustMsgCanNotUseNowMsg);
            GameMsgDef.g_sSubkMasterMsgCanNotUseNowMsg = GetConfig<string>("string", "SubkMasterMsgCanNotUseNowMsg", GameMsgDef.g_sSubkMasterMsgCanNotUseNowMsg);
            GameMsgDef.g_sSendOnlineCountMsg = GetConfig<string>("string", "SendOnlineCountMsg", GameMsgDef.g_sSendOnlineCountMsg);
            GameMsgDef.g_sWeaponRepairSuccess = GetConfig<string>("string", "WeaponRepairSuccess", GameMsgDef.g_sWeaponRepairSuccess);
            GameMsgDef.g_sDefenceUpTime = GetConfig<string>("string", "DefenceUpTime", GameMsgDef.g_sDefenceUpTime);
            GameMsgDef.g_sMagDefenceUpTime = GetConfig<string>("string", "MagDefenceUpTime", GameMsgDef.g_sMagDefenceUpTime);
            GameMsgDef.g_sDefenceUpTimeOver = GetConfig<string>("string", "DefenceUpTimeOver", GameMsgDef.g_sDefenceUpTimeOver);
            GameMsgDef.g_sMagDefenceUpTimeOver = GetConfig<string>("string", "MagDefenceUpTimeOver", GameMsgDef.g_sMagDefenceUpTimeOver);
            GameMsgDef.g_sWinLottery1Msg = GetConfig<string>("string", "WinLottery1Msg", GameMsgDef.g_sWinLottery1Msg);
            GameMsgDef.g_sWinLottery2Msg = GetConfig<string>("string", "WinLottery2Msg", GameMsgDef.g_sWinLottery2Msg);
            GameMsgDef.g_sWinLottery3Msg = GetConfig<string>("string", "WinLottery3Msg", GameMsgDef.g_sWinLottery3Msg);
            GameMsgDef.g_sWinLottery4Msg = GetConfig<string>("string", "WinLottery4Msg", GameMsgDef.g_sWinLottery4Msg);
            GameMsgDef.g_sWinLottery5Msg = GetConfig<string>("string", "WinLottery5Msg", GameMsgDef.g_sWinLottery5Msg);
            GameMsgDef.g_sWinLottery6Msg = GetConfig<string>("string", "WinLottery6Msg", GameMsgDef.g_sWinLottery6Msg);
            GameMsgDef.g_sNotWinLotteryMsg = GetConfig<string>("string", "NotWinLotteryMsg", GameMsgDef.g_sNotWinLotteryMsg);
            GameMsgDef.g_sWeaptonMakeLuck = GetConfig<string>("string", "WeaptonMakeLuck", GameMsgDef.g_sWeaptonMakeLuck);
            GameMsgDef.g_sWeaptonNotMakeLuck = GetConfig<string>("string", "WeaptonNotMakeLuck", GameMsgDef.g_sWeaptonNotMakeLuck);
            GameMsgDef.g_sTheWeaponIsCursed = GetConfig<string>("string", "TheWeaponIsCursed", GameMsgDef.g_sTheWeaponIsCursed);
            GameMsgDef.g_sCanotTakeOffItem = GetConfig<string>("string", "CanotTakeOffItem", GameMsgDef.g_sCanotTakeOffItem);
            GameMsgDef.g_sJoinGroup = GetConfig<string>("string", "JoinGroupMsg", GameMsgDef.g_sJoinGroup);
            GameMsgDef.g_sTryModeCanotUseStorage = GetConfig<string>("string", "TryModeCanotUseStorage", GameMsgDef.g_sTryModeCanotUseStorage);
            GameMsgDef.g_sCanotGetItems = GetConfig<string>("string", "CanotGetItemsMsg", GameMsgDef.g_sCanotGetItems);
            GameMsgDef.g_sEnableDearRecall = GetConfig<string>("string", "EnableDearRecall", GameMsgDef.g_sEnableDearRecall);
            GameMsgDef.g_sDisableDearRecall = GetConfig<string>("string", "DisableDearRecall", GameMsgDef.g_sDisableDearRecall);
            GameMsgDef.g_sEnableMasterRecall = GetConfig<string>("string", "EnableMasterRecall", GameMsgDef.g_sEnableMasterRecall);
            GameMsgDef.g_sDisableMasterRecall = GetConfig<string>("string", "DisableMasterRecall", GameMsgDef.g_sDisableMasterRecall);
            GameMsgDef.g_sNowCurrDateTime = GetConfig<string>("string", "NowCurrDateTime", GameMsgDef.g_sNowCurrDateTime);
            GameMsgDef.g_sEnableAllowRebirth = GetConfig<string>("string", "EnableAllowRebirth", GameMsgDef.g_sEnableAllowRebirth);
            GameMsgDef.g_sDisableAllowRebirth = GetConfig<string>("string", "DisableAllowRebirth", GameMsgDef.g_sDisableAllowRebirth);
            GameMsgDef.g_sEnableHearWhisper = GetConfig<string>("string", "EnableHearWhisper", GameMsgDef.g_sEnableHearWhisper);
            GameMsgDef.g_sDisableHearWhisper = GetConfig<string>("string", "DisableHearWhisper", GameMsgDef.g_sDisableHearWhisper);
            GameMsgDef.g_sEnableShoutMsg = GetConfig<string>("string", "EnableShoutMsg", GameMsgDef.g_sEnableShoutMsg);
            GameMsgDef.g_sDisableShoutMsg = GetConfig<string>("string", "DisableShoutMsg", GameMsgDef.g_sDisableShoutMsg);
            GameMsgDef.g_sEnableDealMsg = GetConfig<string>("string", "EnableDealMsg", GameMsgDef.g_sEnableDealMsg);
            GameMsgDef.g_sDisableDealMsg = GetConfig<string>("string", "DisableDealMsg", GameMsgDef.g_sDisableDealMsg);
            GameMsgDef.g_sEnableGuildChat = GetConfig<string>("string", "EnableGuildChat", GameMsgDef.g_sEnableGuildChat);
            GameMsgDef.g_sDisableGuildChat = GetConfig<string>("string", "DisableGuildChat", GameMsgDef.g_sDisableGuildChat);
            GameMsgDef.g_sEnableJoinGuild = GetConfig<string>("string", "EnableJoinGuild", GameMsgDef.g_sEnableJoinGuild);
            GameMsgDef.g_sDisableJoinGuild = GetConfig<string>("string", "DisableJoinGuild", GameMsgDef.g_sDisableJoinGuild);
            GameMsgDef.g_sEnableAuthAllyGuild = GetConfig<string>("string", "EnableAuthAllyGuild", GameMsgDef.g_sEnableAuthAllyGuild);
            GameMsgDef.g_sDisableAuthAllyGuild = GetConfig<string>("string", "DisableAuthAllyGuild", GameMsgDef.g_sDisableAuthAllyGuild);
            GameMsgDef.g_sEnableGroupRecall = GetConfig<string>("string", "EnableGroupRecall", GameMsgDef.g_sEnableGroupRecall);
            GameMsgDef.g_sDisableGroupRecall = GetConfig<string>("string", "DisableGroupRecall", GameMsgDef.g_sDisableGroupRecall);
            GameMsgDef.g_sEnableGuildRecall = GetConfig<string>("string", "EnableGuildRecall", GameMsgDef.g_sEnableGuildRecall);
            GameMsgDef.g_sDisableGuildRecall = GetConfig<string>("string", "DisableGuildRecall", GameMsgDef.g_sDisableGuildRecall);
            GameMsgDef.g_sPleaseInputPassword = GetConfig<string>("string", "PleaseInputPassword", GameMsgDef.g_sPleaseInputPassword);
            GameMsgDef.g_sTheMapDisableMove = GetConfig<string>("string", "TheMapDisableMove", GameMsgDef.g_sTheMapDisableMove);
            GameMsgDef.g_sTheMapNotFound = GetConfig<string>("string", "TheMapNotFound", GameMsgDef.g_sTheMapNotFound);
            GameMsgDef.g_sYourIPaddrDenyLogon = GetConfig<string>("string", "YourIPaddrDenyLogon", GameMsgDef.g_sYourIPaddrDenyLogon);
            GameMsgDef.g_sYourAccountDenyLogon = GetConfig<string>("string", "YourAccountDenyLogon", GameMsgDef.g_sYourAccountDenyLogon);
            GameMsgDef.g_sYourCharNameDenyLogon = GetConfig<string>("string", "YourCharNameDenyLogon", GameMsgDef.g_sYourCharNameDenyLogon);
            GameMsgDef.g_sCanotPickUpItem = GetConfig<string>("string", "CanotPickUpItem", GameMsgDef.g_sCanotPickUpItem);
            GameMsgDef.g_sCanotSendmsg = GetConfig<string>("string", "CanotSendmsg", GameMsgDef.g_sCanotSendmsg);
            GameMsgDef.g_sUserDenyWhisperMsg = GetConfig<string>("string", "UserDenyWhisperMsg", GameMsgDef.g_sUserDenyWhisperMsg);
            GameMsgDef.g_sUserNotOnLine = GetConfig<string>("string", "UserNotOnLine", GameMsgDef.g_sUserNotOnLine);
            GameMsgDef.g_sRevivalRecoverMsg = GetConfig<string>("string", "RevivalRecoverMsg", GameMsgDef.g_sRevivalRecoverMsg);
            GameMsgDef.g_sClientVersionTooOld = GetConfig<string>("string", "ClientVersionTooOld", GameMsgDef.g_sClientVersionTooOld);
            GameMsgDef.g_sCastleGuildName = GetConfig<string>("string", "CastleGuildName", GameMsgDef.g_sCastleGuildName);
            GameMsgDef.g_sNoCastleGuildName = GetConfig<string>("string", "NoCastleGuildName", GameMsgDef.g_sNoCastleGuildName);
            GameMsgDef.g_sWarrReNewName = GetConfig<string>("string", "WarrReNewName", GameMsgDef.g_sWarrReNewName);
            GameMsgDef.g_sWizardReNewName = GetConfig<string>("string", "WizardReNewName", GameMsgDef.g_sWizardReNewName);
            GameMsgDef.g_sTaosReNewName = GetConfig<string>("string", "TaosReNewName", GameMsgDef.g_sTaosReNewName);
            GameMsgDef.g_sRankLevelName = GetConfig<string>("string", "RankLevelName", GameMsgDef.g_sRankLevelName);
            GameMsgDef.g_sManDearName = GetConfig<string>("string", "ManDearName", GameMsgDef.g_sManDearName);
            GameMsgDef.g_sWoManDearName = GetConfig<string>("string", "WoManDearName", GameMsgDef.g_sWoManDearName);
            GameMsgDef.g_sMasterName = GetConfig<string>("string", "MasterName", GameMsgDef.g_sMasterName);
            GameMsgDef.g_sNoMasterName = GetConfig<string>("string", "NoMasterName", GameMsgDef.g_sNoMasterName);
            GameMsgDef.g_sHumanShowName = GetConfig<string>("string", "HumanShowName", GameMsgDef.g_sHumanShowName);
            GameMsgDef.g_sChangePermissionMsg = GetConfig<string>("string", "ChangePermissionMsg", GameMsgDef.g_sChangePermissionMsg);
            GameMsgDef.g_sChangeKillMonExpRateMsg = GetConfig<string>("string", "ChangeKillMonExpRateMsg", GameMsgDef.g_sChangeKillMonExpRateMsg);
            GameMsgDef.g_sChangePowerRateMsg = GetConfig<string>("string", "ChangePowerRateMsg", GameMsgDef.g_sChangePowerRateMsg);
            GameMsgDef.g_sChangeMemberLevelMsg = GetConfig<string>("string", "ChangeMemberLevelMsg", GameMsgDef.g_sChangeMemberLevelMsg);
            GameMsgDef.g_sChangeMemberTypeMsg = GetConfig<string>("string", "ChangeMemberTypeMsg", GameMsgDef.g_sChangeMemberTypeMsg);
            GameMsgDef.g_sScriptChangeHumanHPMsg = GetConfig<string>("string", "ScriptChangeHumanHPMsg", GameMsgDef.g_sScriptChangeHumanHPMsg);
            GameMsgDef.g_sScriptChangeHumanMPMsg = GetConfig<string>("string", "ScriptChangeHumanMPMsg", GameMsgDef.g_sScriptChangeHumanMPMsg);
            GameMsgDef.g_sDisableSayMsg = GetConfig<string>("string", "YouCanotDisableSayMsg", GameMsgDef.g_sDisableSayMsg);
            GameMsgDef.g_sOnlineCountMsg = GetConfig<string>("string", "OnlineCountMsg", GameMsgDef.g_sOnlineCountMsg);
            GameMsgDef.g_sTotalOnlineCountMsg = GetConfig<string>("string", "TotalOnlineCountMsg", GameMsgDef.g_sTotalOnlineCountMsg);
            GameMsgDef.g_sYouNeedLevelMsg = GetConfig<string>("string", "YouNeedLevelSendMsg", GameMsgDef.g_sYouNeedLevelMsg);
            GameMsgDef.g_sThisMapDisableSendCyCyMsg = GetConfig<string>("string", "ThisMapDisableSendCyCyMsg", GameMsgDef.g_sThisMapDisableSendCyCyMsg);
            GameMsgDef.g_sYouCanSendCyCyLaterMsg = GetConfig<string>("string", "YouCanSendCyCyLaterMsg", GameMsgDef.g_sYouCanSendCyCyLaterMsg);
            GameMsgDef.g_sYouIsDisableSendMsg = GetConfig<string>("string", "YouIsDisableSendMsg", GameMsgDef.g_sYouIsDisableSendMsg);
            GameMsgDef.g_sYouMurderedMsg = GetConfig<string>("string", "YouMurderedMsg", GameMsgDef.g_sYouMurderedMsg);
            GameMsgDef.g_sYouKilledByMsg = GetConfig<string>("string", "YouKilledByMsg", GameMsgDef.g_sYouKilledByMsg);
            GameMsgDef.g_sYouProtectedByLawOfDefense = GetConfig<string>("string", "YouProtectedByLawOfDefense", GameMsgDef.g_sYouProtectedByLawOfDefense);


            GameMsgDef.sCrsHitOn = GetConfig<string>("string", "CrsHitOn", GameMsgDef.sCrsHitOn);
            GameMsgDef.sCrsHitOff = GetConfig<string>("string", "CrsHitOff", GameMsgDef.sCrsHitOff);
            GameMsgDef.sSkill43On = GetConfig<string>("string", "TwinSkillSummoned2", GameMsgDef.sSkill43On);
            GameMsgDef.sSkill43Off = GetConfig<string>("string", "TwinSkillsFail2", GameMsgDef.sSkill43Off);
            GameMsgDef.sSkill42On = GetConfig<string>("string", "KTZSpiritsSummoned", GameMsgDef.sSkill42On);
            GameMsgDef.sSkill42Off = GetConfig<string>("string", "KTZSpiritsGone", GameMsgDef.sSkill42Off);
        }


        public T GetConfig<T>(string nodeName, string keyName, object defaultValue)
        {
            if (!_tableConfig.ContainsKey(nodeName))
            {
                return (T)Convert.ChangeType(defaultValue, typeof(T));
            }
            var yamlNode = _tableConfig.Get<Dictionary<string, object>>(nodeName);
            if (!yamlNode.TryGetValue(keyName, out object valuesData))
            {
                return (T)Convert.ChangeType(defaultValue, typeof(T));
            }
            return (T)Convert.ChangeType(valuesData, typeof(T));
        }
    }
}